import request from '../utils/request.js';


//查询所有角色
export function findAll(data){
  return request({
    url:'/api/rbacPerm/'+data.page+'/'+data.limit,
    method:'get',
  })
}

export function editType(data) {
  return request({
      url: '/api/rbacPerm/' + data,
      method: 'get',
  })
}

export function updateOne(data) {
  return request({
      url: '/api/rbacPerm/',
      method: 'put',
      data
  })
}

export function addOne(data) {
  return request({
      url: '/api/rbacPerm/',
      method: 'post',
      data
  })
}

export function search(parameter, name, code) {
  return request({
      url: '/api/rbacPerm/' + parameter.page + "/" + parameter.limit + '/' + name + '/' + code,
      method: 'get',
  })
}